Welcome to Mesa 3D Graphics Library.

Disclaimer

Mesa is a 3-D graphics library with an API which is very similar to that
of OpenGL*.  To the extent that Mesa utilizes the OpenGL command syntax
or state machine, it is being used with authorization from Silicon Graphics,
Inc.  However, the author makes no claim that Mesa is in any way a
compatible replacement for OpenGL or associated with Silicon Graphics, Inc.
Those who want a licensed implementation of OpenGL should contact a licensed
vendor.  This software is distributed under the terms of the GNU Library
General Public License, see the LICENSE file for details.

* OpenGL(R) is a registered trademark of Silicon Graphics, Inc. 


Author

Brian Paul
Avid Technology
6400 EnterPrise Lane, Suite 201
Madison, WI  53719

brianp@elastic.avid.com

Formerly employed at the Space Science and Engineering Center at the
University of Wisconsin - Madison.

Mac-port done by: 

Mikls Fazekas
boga@elte.hu  

All questions about the Mac distribution should sent to me. (boga@elte.hu)
Also see the Mac-Mesa hompage for the lastest version:
http://www.elte.hu/~boga/Mesa.html

Installing Mesa for Mac:
Install the shared libraries:

Place the folder named Mesa3D inside the folder Extensions: PPC Extensions: into the System Folder:Extensions Folder. (No restart needed)

If you wan't to use the Debug Libraries, change the glShdLib to the one located in the Debug Extensions. (note the debug version can be 2x slower than the optimized!!!)

Try to compile the program Sample, at Examples:Sample. (Projects for CodeWarrior Pro included) 
If you have other CodeWarrior/Compiler, make an ANSI C PPC project, and put the 
"Mesa 3D Graphics Library:Headers" folder into the Access Paths:System Path. Then put the glShdLib, gluShdLib, glutShdLib, aglShdLib from the Libraries folder into the project. Set the application heap to 4000 Kb, and the stack size to 128 kb. Also include the source named GlutHello.c Then run. 
If it doesn't run contact me. (boga@elte.hu)
Tip: The example folder contains some interesting OpenGL (ideas, geoface, ...) programs.


Installing GLUT Documentation:

Copy the "glut.qv" file into your QuickView folder (if installed). 
Run QuickView, and type "glut" and press return to test the installation.



Mac implementation notes:
Mesa 3D Graphics Library is a shared library for PowerPC/CFM-68K based computers running MacOS. The Api is in C with support for development using C++. This library was written with CodeWarrior Pro 1, and you can use best with it. Other compilers with CFM support also sould work.


RoadMap to enclosed folders:

Interfaces - This folder contains the headers.

Libraries - This folder contains the link libraries (the shared libraries that you use to link against). You should use the files in this folder to link your application. To write application that use the OpenGL API link against glShdLib,gluShdLib,aglShdLib. To make use of the GLUT toolkit, also link against glutShdLib. To make use of the AUX/TK toolkit also link against the auxShdLib. (Currently avaible for PPC only).

Examples - This folder contains sample code to help you get started developing Mesa/OpenGL applications. (Most of these demos from the GLUT distribution, see the GLUT ReadMe int the ReadMe's/License folder). The RedBook folder contains simple examples, the other examples are more complex.

Documentation - This folder contains the GLUT databases for the Toolbox Assistant, and a text file desribes AGL, the MacOS interface for Mesa/OpenGL.

ReadMe's/License - This folder contains more information about Mesa, GLUT. You should also read the LICENSE and the COPYRIGHT files.

Debug Extensions - This folder contains debugging versions of the Mesa glShdLib extension file.  You should place these files in the Extensions folder inside your System Folder and use them during your development process.  The debugging version of Mesa provides more extensive error handling and posts Notices, altough somewhat slower than the optimized version found in the System Folder Items folder. You should also run a debugger when  running with the deug extensions.

Optimized Extensions - This folder contains optimized versions of the Mesa aglShdLib,glShdLib,gluShdLib,glutShdLib,auxShdLib, extension file.  You should place these files in the Extensions folder inside your System Folder. (No restart needed).

Library Source- This folder contains the source code for the Mesa, AGL interface for Mesa, AUX/TK toolkits for Mac, GLUT for Mac libraries.

New for version 2.4.1:
 Uses Mesa 2.4b3
 Better glut library.
 Bugs fixed in aglMakeCurrent
 Added support for 16-bit.
 Better glShdLib.dbg
Examples:
 PowerPlant class CGLPane included
 More demos form the GLUT packege
 GLTeapot ported from BeOS.

New for version 2.4:

 68K support by thanks to Steeven Bytar.
 AUX/TK is back.
 Distributed on Info-Mac
GLUT:
 glutTimer-bugs fixed.
 faster (spends less time on GetNextEvent).
 glutShowWindow,glutHideWindow,glutDestroyWindow, glutGet implemented.
 New demos from the glut 3.5 package.
MESA/AGL:
 Mesa 2.4b2. (A bug fixed version of Mesa 2.3)
 Revisted frame buffering scheme (read Mac Notes for details).
 Debug version of the glShdLib.

GLUT Implementation notes:

The GLUT is partially supported but still unstable although most sources in examples work nice. (If you have wish what function/functions to port write it to me!) My GLUT implementation is based on PowerPlant, and not fully follows the GLUT specification. 

An online GLUT-help  in QuickView is avaible.

GLUT expects a three-button mouse and to implement this on the Macintosh the modifier keys are used in conjunction with the mouse button. The mappings are:

	 by itself	 Left button
		with<Control>	Left button
		with<Option> Middle button
		with<Command>	Right button

	All modifiers may be used at any time during a single button press.
	All of the examples under Examples  use the GLUT API.

Performance tips:

 Put the monitor to 32-bit mode.
 Turn off smooth shading when you don't need it (glShadeModel)
 Turn off depth buffering when you don't need it.
 Turn off dithering when not needed.
 Use double buffering as it's often faster than single buffering.
 Try to maximize the amount of drawing done between glBegin/glEnd pairs.
 Use the info window (command-I) in GLUT to find best performance.
 Optimized polygon rasterizers are employed when:
         RGB mode, not grayscale, not monochrome
         depth buffering is GL_LESS, or disabled
         flat or smooth shading
         dithered or non-dithered
         no other rasterization operations enabled (blending, stencil, etc)
 Optimized line drawing is employed when:
         rendering into back buffer which is an XImage
         RGB mode, not grayscale, not monochrome
         depth buffering is GL_LESS or disabled
         flat shading
         dithered or non-dithered
         no other rasterization operations enabled (blending, stencil, etc)
 Textured polygons are fastest when:
         using a 3-component (RGB), 2-D texture
         minification and magnification filters are GL_NEAREST
         texture coordinate wrap modes for S and T are GL_REPEAT
         GL_DECAL environment mode
         glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST )
         depth buffering is GL_LESS or disabled
 Lighting is fastest when:
         Two-sided lighting is disabled
         GL_LIGHT_MODEL_LOCAL_VIEWER is false
         GL_COLOR_MATERIAL is disabled
         No spot lights are used (all GL_SPOT_CUTOFFs are 180.0)
         No local lights are used (all position W's are 0.0)
         All material and light coefficients are >= zero

Further Readings:
For more information about Mesa  please read the Mesa ReadMe in the ReadMe's/License folder.
For more information about glut see the glut.qv file located in the Documentation folder.
For more information about agl see the agl.txt file located in the Documentation folder.
For more information about the Mac implementation see the file Mac Notes inside the ReadMe's/License folder.

Mikls Fazekas. 1997/08/21